/*
 * @Description: 统计接口
 * @Date: 2022-12-20 21:27:57
 * @Author: lizhiqiang
 */
import {post} from "@/utils/request";
/**
 * 统计
 * @param params 
 * @returns 
 */
export const statistics = (params:{
  endTime: string;
  pkChannel: string;
  pkMerchant: string;
  startTime: string;
  pkMerchantId?: string;
})=>{
    return post("/acct-service/statistics/statistics",params)
}
/**
 * 今日数据
 * @param params 
 * @returns 
 */
export const todayStatistics = (params:{
  endTime: string;
  pkChannel: string;
  pkMerchant: string;
  startTime: string;
})=>{
    return post("/acct-service/statistics/todayData",params)
}
/**
 * 交易金额
 * @param params 
 * @returns 
 */
export const transactionAmount =(params:{
    pkChannel:string;
    pkMerchant:string;
    type:number;
})=>{
    return post("/acct-service/statistics/transactionAmount",params)
}
/**
 * 平均价格
 * @param params 
 * @returns 
 */
export const transactionAveragePrice = (params:{
    pkChannel:string;
    pkMerchant:string;
    type:number;
})=>{
    return post("/acct-service/statistics/transactionAveragePrice",params);
}
/**
 * 交易量
 * @param params 
 * @returns 
 */
export const transactionCount = (params:{
    pkChannel:string;
    pkMerchant:string;
    type:number;
})=>{
    return post("/acct-service/statistics/transactionCount",params)
}

//首页交易
export const getTransaction = (params:{
    type:string
})=>{
    return post(`/pay/admin/adminCommonPay/TradingVolume?type=${params}`,params)
}

//分别的数据
export const getStatisticCount = ()=>{
    return post("/pay/admin/adminCommonPay/statistics")
}

//查询首页折线图数据
export const getMonthDataAPI = ()=>{
    return post("/pay/admin/adminCommonPay/tradingMonth")
}

//获取排名
export const getRankDataAPI = ()=>{
    return post("/pay/admin/adminCommonPay/tradingMoney")
}